import 'dart:io';

import 'package:flutter/material.dart';

class IOPlatformExample extends StatefulWidget {
  @override
  _IOPlatformExampleState createState() => _IOPlatformExampleState();
}

class _IOPlatformExampleState extends State<IOPlatformExample> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("IOPlatformExample"),
      ),
      floatingActionButton: FloatingActionButton(onPressed: () {
        print(Platform.localeName); // en_CN
        print(Platform.localHostname); // liushan-ceshiji
        print(Platform.operatingSystem); // ios
      }),
    );
  }
}
